package com.duying.gh.dao;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import com.busi.framework.base.BaseDao;
import com.duying.gh.model.BaseXzType;

public class BaseXzTypeDao  extends BaseDao{
	public Class getEntityClass(){
		return BaseXzType.class;
	}
	
	 
	public BaseXzType getXzType(String typeCode){
		String hql = "from BaseXzType x where x.auditing = 1 and x.type_code =:type_code";
		Map map = new HashMap();
		map.put("type_code", typeCode);
		List list = this.getByHQL(hql , map);
		if(list.isEmpty()){
			return null;
		}else{
			return (BaseXzType)list.get(0);
		}
	}
	
	public BaseXzType getDefaultXzType(){
		return getXzType("000000");
	}
	
}
